


#include "MyGLUtils.h"

void clearGLError(void) {
	while (glGetError() != GL_NO_ERROR) {}
}
void checkGLError(const char* file, int line) {
	GLenum error = glGetError();
	if (error != GL_NO_ERROR) {
		fprintf(stderr, "gl error:0x%x\n", error);
		fprintf(stderr, "file:%s\n", file);
		fprintf(stderr, "line:%d\n", line);
		exit(1);
	}
}
